package com.eptok.gw.szcups.common;

import java.nio.charset.Charset;


/**
 *@author:heqishan, Email:heqishan@gmail.com
 *2013-3-4 下午06:52:49
 */
public class GateWayConstant {
	
	public static final String CHAR_ENCODE = "GBK";
	public static final Charset CHARSET = Charset.forName(CHAR_ENCODE);
	
	/**NIO参数**/
	public static final long ASYN_CONNECT_TIMEOUT = 30 * 1000L;		//连接超时时间	(ms)
	public static final int ASYN_IDLE_TIME = 110;					//写空闲时间	(s)
	
	public static final int ASYN_EXPIRINT_TIMEOUT = 300;			//响应容器的过期时间(s)
	public static final int ASYN_EXPIRINT_INTERVAL = 1;				//响应容器的扫描时间(s)
	public static final int ASYN_SCAN_CONTAINER_INTERVAL = 50;		//扫描返回信息响应时间(ms)	
	public static final long RECONNECTOR_INTERVFAL = 5 * 1000L;		//重连线程扫描间隔
	
	public static final int EXPIRINT_TIMEOUT = 100;				//响应容器的过期时间(s)
	public static final int EXPIRINT_INTERVAL = 1;				//响应容器的扫描时间(s)
	
	
	
	/**8583报文类型**/
	public static final String MSG_CODE_TEMPLATE_ID = "SZ_CUPS";	//8583模板ID
	public static final String MSG_CODE_SING_REQ = "0820";			//签到请求
	public static final String MSG_CODE_SING_RSP = "0830";			//签到响应
	
	public static final String MSG_CODE_SING_RESET_REQ = "0800";			//重置密钥请求
	public static final String MSG_CODE_SING_RESET_RSP = "0810";			//重置密钥响应
	
	public static final String MSG_CODE_RELATIONSHIP_REQ = "0100";			//建立委托关系/撤销委托关系	请求
	public static final String MSG_CODE_RELATIONSHIP_RSP = "0110";			//建立委托关系/撤销委托关系	响应
	public static final String MSG_CODE_CARDPAY_REQ = "0200";				//消费类交易 请求
	public static final String MSG_CODE_CARDPAY_RSP = "0210";				//消费类交易 响应
	public static final String MSG_CODE_CARDPAY_RETURN_REQ = "0220";			//消费撤销 请求
	public static final String MSG_CODE_CARDPAY_RETURN_RSP = "0230";			//消费撤销 响应
	
	public static final String MSG_CODE_CREDIT_CARD_REPAY_REQ = "0200";			//信用卡还款 请求
	public static final String MSG_CODE_CREDIT_CARD_REPAY_RSP = "0210";			//信用卡还款 响应
	
	public static final String MSG_CODE_CARDQUERY_REQ = "0200";				//银行卡余额查询 请求
	public static final String MSG_CODE_CARDQUERY_RSP = "0210";				//银行卡余额查询 响应
	
	public static final String MSG_CODE_REVERSAL_REQ = "0400";			//冲正 请求
	public static final String MSG_CODE_REVERSAL_RSP = "0410";			//冲正 响应
	
	public static final String MSG_CODE_COLLECTION_REQ = "0200";			//代收 请求
	public static final String MSG_CODE_COLLECTION_RSP = "0210";			//代收 应答
	
	public static final String MSG_CODE_RELATIONSHIP_NOTIFY_REQ = "0220";	//建立委托关系/撤销委托关系通知 请求
	public static final String MSG_CODE_RELATIONSHIP_NOTIFY_RSP = "0230";	//建立委托关系/撤销委托关系通知 响应
	
	
	
	/**深银联8583固定值**/
	public static final String NETWORK_MESSAGE_CODE = "161";			//网络管理信息码
	public static final String FIELD_39 = "00";							//39域成功
	public static final String FIELD_3_RELATIONSHIP_BUILD = "930000";			//建立委托关系处理码
	public static final String FIELD_3_RELATIONSHIP_CANCEL = "940000";			//撤销委托关系处理码
	public static final String FIELD_3_CARDPAY = "190000";				//消费关系处理码
	public static final String FIELD_3_CANCEL_CARDPAY = "280000";		//消费撤销处理码
	public static final String FIELD_3_RETURN_CARDPAY = "200000";		//消费退货处理码
	public static final String FIELD_3_CTDREPAYMENT = "190000";			//信用卡还款处理码
	public static final String FIELD_3_SIGLECOLT = "190000";			//单笔代收
	public static final String FIELD_3_BCDBLANCE_QRY = "300000";			//银行卡余额查询
	public static final String FIELD_22 = "021";						//服务点输入方式码	(磁条方式包含pin)
	public static final String FIELD_22_NO_PIN_NO_TRACK = "012";					//服务点输入方式码	(无磁无密)
	public static final String FIELD_22_FOR_RETURN = "022";						//服务点输入方式码	(磁条方式包没有pin)
	public static final String FIELD_25_RELATIONSHIP = "00";			//服务点条件码_建立/撤销委托关系
	public static final String FIELD_25_CTDREPAYMENT = "81";			//服务点条件码_信用卡还款
	public static final String FIELD_25_COLLECTION = "81";			//服务点条件码_信用卡还款
	public static final String FIELD_25_CARDPAY = "82";					//服务点条件码_消费
	public static final String FIELD_25_CARD_QUERY = "00";				//服务点条件码_银行卡余额查询
	public static final String FIELD_26 = "06";							//服务点PIN 获取码
	public static final String FIELD_48_RELATIONSHIP_TAG = "KC";		//用法标志_定向委托
	public static final String FIELD_48_CREDIT_REPAY_TAG = "PA";		//用法标志_信用卡还款
	public static final String FIELD_48_COLLECTION_TAG = "KP";			//代收_信用卡还款
	public static final String FIELD_48_CARDPAY_TAG = "CN";				//用法标志_消费
	public static final String FIELD_48_RELATIONSHIP_USERTYPE = "FE";	//用户号码类型_定向委托
	public static final String FIELD_48_CREDIT_REPAY_USERTYPE = "08";	//用户号码类型_信用卡还款
	public static final String FIELD_48_COLLECTION_USERTYPE = "FE";	//用户号码类型_代收
	public static final String FIELD_48_COLLECTION_INDEX = "0000000000";	//代收_缴费索引(YYYYMMXXXX，其中，前6位为缴费年月。当本子域填写全“0”时，用于缴纳全部帐单费用)
	public static final String FIELD_48_CREDIT_REPAY_MONTH = "000000";	//缴费月份_信用卡还款
	public static final String FIELD_48_RELATIONSHIP_AREACODE1 = "5840";	//用户号码地区编码
	public static final String FIELD_48_RELATIONSHIP_AREACODE2 = "0000";	//用户号码附加地区编码
	public static final String FIELD_48_RELATIONSHIP_MARK = "2";			//支付方式标志--委托商户
	public static final String FIELD_48_RELATIONSHIP_TIME_LIMIT = "000";			//委托关系限期--000长期有效
	public static final String FIELD_48_END = "#";							//结束标志
	public static final String FIELD_49 = "156";							//交易货币代码--人民币
	public static final String FIELD_53 = "1600000000000000";				//安全控制信息
	public static final String FIELD_60 = "000002001100000";				//自定义域
	
	public static final String FIELD_39_SUCCESS = "00";						//返回代码_成功
	
	
	
	
	
	
}
